
<script src="js/loadProducts.js" type="text/javascript"></script>
{{#each this}}
<div class=" item col-md-2 col-md-offset-1">
    <div class="panel panel-default">
        <div class="panel-heading">
            <p> {{PName}}</p>
        </div>
        <div class="panel-body">
            <img src="{{PImg}}" width="200" class="img img-thumbnail img-rounded" style="border: 2px solid black;
                 border-radius: 30px;
                 -moz-border-radius: 30px;
                 -khtml-border-radius: 30px;
                 -webkit-border-radius: 30px;">

            <p>{{PDescription}}</p>

            <p> Price: {{pricePerUnit}} SGD</p>

        </div>
        <div class="panel-footer" id="buy">
            <button class="btn-primary btn-sm" id='addbtn_{{productID}}' data-productid="{{productID}}"> Add to Cart </button>
            <button class="btn-info btn-sm pull-right"> More </button>
        </div>

    </div>
</div>
<!--<script>
$(function()
{
    $("button[id^='addbtn_']").click(function()
    {
        alert("working");
        var prodid = $(this).data("productid");
        addtocart(prodid);
        
    })
    addtocart();

});

</script>-->
{{/each}}
